#!/usr/bin/python3.4

import sys

def readfile(name):
    with open(name) as f:
        for line in f:
            print(line, end="") 
    f.close()

def main():
    if len(sys.argv) < 2:
        print('No action specified.')
        sys.exit()

    if sys.argv[1].startswith('--'):
        option = sys.argv[1][2:]
        if option == 'version':
            print("Version 0.1")
        elif option == 'help':
            print( '''\
This program prints files to the standard output.
Any number of files can be specified.
Options include:
    --version   : Prints the version number
    --help      : Display this help
            ''')
        else:
            print("Unknown option.")
        sys.exit()
    else:
        for name in sys.argv[1:]:
            readfile(name)
        

if __name__ == '__main__':
    main()
